package com.javaoopone;

public class User {
    String uName;
    int age;

    public void print(){
        String str="";
        if(age>=20){
            str="门票价格为"+20;
        }else {
            str="门票免费";
        }
        System.out.println(uName+"的年纪是"+age+"，门票的价格为"+str);
    }

}
